home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-11 | 1.5 KB | 49 lines | [TEXT/GEOL] |
- Item 0012495 11-Oct-89 13:40
-
- From: D1282 Power Up,PRT
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: Undoable lists
-
- Attn: MacApp.Tech$
- SentBy: James Plamondon
- Date 10/11/89
- Subject Undoable lists
- From James Plamondon
- To MacApp.Tech$
-
- Subject: Undoable lists
- Gentlepersons,
-
- Here's a quick question for you. I need to keep track of items cut from and
- pasted into a list, so that I can undo the cut or paste as requested.
-
- My first thought on how to do this is to keep a flag in each list item,
- indicating whether the item was just added to the list, just deleted from the
- list, or was a 'normal' list item. A Commit() would change the 'just added'
- items to 'normal' and permanently delete the 'just deleted' items. An Undo()
- would change the 'just added' items to 'just deleted' items, and vice versa.
-
- With this in mind, I have two questions:
- 1) Does anybody see anything wrong with this approach, or, alternatively,
- a better
- approach? Any words of warning, things to look out for, etc.?
- 2) If the approach is sound, does anyone have such a list class (possibly
- a descendant of
- TList) that they might be willing to share?
-
- Thanks for your help!
-
- James Plamondon
- Software Engineer
- PowerUp! Software
- 2929 Campus Drive, Suite 300
- San Mateo, CA 94403
- (415) 345-5900 x351
- AppleLink: D1282
- CompuServe: 71230,734
-
- P.S.: This would be trivially easy in Eiffel.
-
-